package com.company;

public class Hunting {
    Hunter hunter;
    String job;
    String  weapon;
    Monster m1,m2,m3,m4,m5;

    public Hunting(){
        int randomB = GameUtil.randomRange(1,16);
        switch (randomB){
            case 1:job = "牧师"; break;
            case 2:job = "战士"; break;
            case 3:job = "法师"; break;
            case 4:job = "巡林客"; break;
            case 5:job = "游荡者"; break;
            case 6:job = "武僧"; break;
            case 7:job = "圣骑士"; break;
            case 8:job = "德鲁伊"; break;
            case 9:job = "术士"; break;
            case 10:job = "学者"; break;
            case 11:job = "神眷者"; break;
            case 12:job = "道士"; break;
            case 13:job = "猎手"; break;
            default:job = "心灵术士"; break;
        }
        int randomA = GameUtil.randomRange(1,6);
        switch (randomA){
            case 1:weapon = "黑暗剑+22"; break;
            case 2:weapon = "混种大剑"; break;
            case 3:weapon = "混合大鸡腿"; break;
            case 4:weapon = "灭龙大弓"; break;
            default:weapon = "[数据删除]"; break;
        }
        hunter = new Hunter("秦川德里奇",job,weapon);
        m1 = new Monster(3);
        m2 = new Monster(3);
        m3 = new Monster(3);
        m4 = new Monster(2);
        m5 = new Monster(4);


    }
    public void start(){

        while(hunter.isLive && (m1.isLive || m2.isLive || m3.isLive || m4.isLive || m5.isLive)){
            System.out.println("等等   这是什么！");

            int ran = GameUtil.randomRange(1,10);
            switch(ran){
                case 1: hunter.fight(m1);   break;
                case 2: hunter.fight(m2);   break;
                case 3: hunter.fight(m3);   break;
                case 4: hunter.fight(m4);   break;
                case 5: hunter.fight(m5);   break;
                case 6: hunter.treasure = hunter.treasure+1;System.out.println("得到了珍宝！贪婪的猎人 你现在有"+hunter.treasure+"件珍宝了"); break;
                default:System.out.println("房间内充满了金光，但是，当你触碰到找到的黄金时，他们化作了尘土，显然，这是法师们恶劣的玩笑.你只能苦笑 然后咒骂这群喝墨水的混蛋");     break;
            }
            break;
        }
        end();
    }
    public void end(){
        if(hunter.isLive == true){
            if(GameUtil.randomRange(1,15)<=6) {
                System.out.println("我就是吞噬缺神的秦川德里奇！ ");
                System.out.println("继续前进吧！选择你的方向：");
            }else{
                System.out.println("恶劣的玩笑使你感到生气，但是前方的机遇还在诱惑着你，前进吧，进行你得选择：");
            }
        }else{
            System.out.println("在幽暗的地宫中，缺神的幽魂在喃呢：摸鱼");
            System.exit(-1);
        }
    }
}
